/*
 * <p>Copyright ®Alyce_WX版权所有。</p>
 * 类名:RightPO
 * 创建人:alyce_wx
 * 创建时间:2017-03-30
 */
package com.wx.demo.wcd.domain.po;


import com.yjhl.framework.domain.po.PO;
import com.wx.demo.wcd.domain.pk.RightPK;

/**
 * persistent class for Right 
 * @author alyce_wx
 * @since 1.8
 * @version 1.0.0  
 */
 
public class RightPO extends PO {
    private static final long serialVersionUID = 1L;
    
    /**
     * 权限标识
     */
    private String rightId;
    
    /**
     * 权限名称
     */
    private String rightName;
    
    /**
     * 权限描述
     */
    private String rightDesc;
    
    /**
     * 权限代码
     */
    private String rightCode;

    public String getRightId() {
        return rightId;
    }

    public void setRightId(String rightId) {
        this.rightId = rightId;
    }

    public String getRightName() {
        return rightName;
    }

    public void setRightName(String rightName) {
        this.rightName = rightName;
    }

    public String getRightDesc() {
        return rightDesc;
    }

    public void setRightDesc(String rightDesc) {
        this.rightDesc = rightDesc;
    }

    public String getRightCode() {
        return rightCode;
    }

    public void setRightCode(String rightCode) {
        this.rightCode = rightCode;
    }
    
    
	/**
	 * @see com.yjhl.framework.domain.po.PO#isNull()
	 */
	@Override
    public boolean isNull(){
		return (		
    		rightId == null     	
    		&&
    		rightName == null     	
    		&&
    		rightDesc == null     	
    		&&
    		rightCode == null     	
				);
	}
	
	/**
	 * @see com.yjhl.framework.domain.po.PO#isEmpty()
	 */
	@Override
    public boolean isEmpty(){
		return (		
    	rightId == null 
    		&&
    	rightName == null 
    		&&
    	rightDesc == null 
    		&&
    	rightCode == null 
				);
	}
	
	/**
	 * @see com.yjhl.framework.domain.po.PO#isNonPkNull()
	 */
	@Override
    public boolean isNonPkNull(){
		return (		
    		rightName == null     	
    		&&
    		rightDesc == null     	
    		&&
    		rightCode == null     	
				);
	}

	/**
	 * @see com.yjhl.framework.domain.po.PO#isNonPkEmpty()
	 */
	@Override
    public boolean isNonPkEmpty(){
		return (		
    	rightName == null 
    		&&
    	rightDesc == null 
    		&&
    	rightCode == null 
				);
	}
	
	
	/**
	 * @see com.yjhl.framework.domain.po.PO#buildPK()
	 */
	@Override
    public RightPK buildPK(){
    	RightPK entityPK = new RightPK();
    	
		entityPK.setRightId( rightId );
    	
    	return entityPK;
	}
	
	
	@Override
	public String toString(){
		
		String toString = "{";
		  	 if(this.rightId != null){
		   	 	toString += (this.rightId+",");
		   	 }
		  	 if(this.rightName != null){
		   	 	toString += (this.rightName+",");
		   	 }
		  	 if(this.rightDesc != null){
		   	 	toString += (this.rightDesc+",");
		   	 }
		  	 if(this.rightCode != null){
		   	 	toString += (this.rightCode+",");
		   	 }
		  if(toString.lastIndexOf(",") == ( toString.length()-1)){
		  	toString = toString.substring(0, toString.length()-1);
		  }
		 toString += "}";
		return toString;
		
	}
	
	public String inputDescription(){
		
		String inputDescription = "{";
		   if(this.rightId != null){
		   		inputDescription += (this.rightId+" : 权限标识,");
		   }
		   if(this.rightName != null){
		   		inputDescription += (this.rightName+" : 权限名称,");
		   }
		   if(this.rightDesc != null){
		   		inputDescription += (this.rightDesc+" : 权限描述,");
		   }
		   if(this.rightCode != null){
		   		inputDescription += (this.rightCode+" : 权限代码,");
		   }
		  if(inputDescription.lastIndexOf(",") == ( inputDescription.length()-1)){
		  	inputDescription = inputDescription.substring(0, inputDescription.length()-1);
		  }
		  inputDescription += "}";
		
		return inputDescription;
	}
}
